<?php  echo $this->Session->flash();?>

<div class="row">
	<div class="col-lg-12">
		<h1 class="page-header">Add new category</h1>
	</div>
</div>
<?php echo $this->Form->create('Category', array('class' => 'ajax_page'));?>
<table class="table table-striped table-bordered table-hover" id="dataTables-example">
	<tr>
		<th width="20%">Choose type category</th>
		<td>
			<?php
			echo $this->Form->input('cat_type', array(
					'options' => $category_type,
					'empty' => '--Choose category--',
					'label' => false,
					'class' => 'form-control',
			));
			?>
		</td>
	</tr>
	<tr>
		<th>Tên danh mục</th>
		<td>
			<?php
			echo $this->Form->input('cat_name', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w400',
					'required' => true,
					'id'=>'cat_name',
					'value'=>'',
			));
			?>
		</td>
	</tr>

	<tr>
		<th>Parent category</th>
		<td>
			<div class="category_type">
				<select name="cat_parent_id" id="cat_parent_id" class="form-control">
					<option value="0">--[upper_category]--</option>
				</select>
			</div>
		</td>
	</tr>

	<tr>
		<th>order</th>
		<td>
			<?php
			echo $this->Form->input('cat_order', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control',
					'id'=>'cat_order',
					'value'=>''
			));
			?>
		</td>
	</tr>

	<tr>
		<th>Title SEO</th>
		<td>
			<?php
			echo $this->Form->input('cat_title', array(
					'type' => 'text',
					'label' => false,
					'class' => 'form-control w400',
					'id'=>'cat_title',
					'value'=>'',
			));
			?>
		</td>
	</tr>
	<tr>
		<th>Keyword SEO</th>
		<td>
			<?php
				echo $this->Form->textarea('cat_keyword', array(
					'label' => false,
					'required' => false,
					'rows'=> 4,
					'cols' => 70,
					'value'=>'',
				));
			?>
		</td>
	</tr>
	<tr>
		<th>Description SEO</th>
		<td>
			<?php
				echo $this->Form->textarea('cat_description', array(
					'label' => false,
					'required' => false,
					'rows'=>4,
					'cols' => 70,
					'value'=>'',
				));
			?>
		</td>
	</tr>
	<tr>
		<th>&nbsp;</th>
		<td>
			<div class="form-group">
			<?php
			echo $this->Form->hidden('cat_active', array('value' => 1));

			echo $this->Form->button('Submit', array(
					'type' => 'submit',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			).'  ';

			echo $this->Form->button('Reset', array(
					'type' => 'reset',
					'class' => 'btn btn-primary',
					'label' => false,
					'div' => false,
				)
			);
			?>
			</div>
		</td>
	</tr>
</table>
<?php echo $this->Form->end()?>